<?php
include "include/config.inc.php";
$documentId = array();
$documentName = array();
$m=0;
$partyId     = $_REQUEST['partyId'];
$addOn       = isset($_REQUEST['addOn']) ? $_REQUEST['addOn'] : "";
$partyName   = "";
$gPartyName  = "";
$address     = "";
$gAddress    = "";
$mobile      = "";
$photo       = "defoult.jpg";
$otherInfo   = "";

$selectParty = "SELECT partyId, partyName, gPartyName, address, mobile, photo, otherInfo
                  FROM party
                 WHERE partyId = ".$partyId;
$selectPartyRes = mysql_query($selectParty);
if($selectPartyRes)
{
  while($selectPartyRow = mysql_fetch_array($selectPartyRes))
  {
    $partyId    =  $selectPartyRow['partyId'];
    $partyName  =  $selectPartyRow['partyName'];
    $gPartyName =  $selectPartyRow['gPartyName'];
    $address    =  $selectPartyRow['address'];
    $mobile     =  $selectPartyRow['mobile'];
    $photo      =  $selectPartyRow['photo'];
    $otherInfo  =  $selectPartyRow['otherInfo'];
  }
}
else
{
  $partyId    =  "";
  $partyName  =  "";
  $gPartyName =  "";
  $address    =  "";
  $gAddress   =  "";
  $mobile     =  "";
  $photo      =  "defoult.jpg";
  $otherInfo  =  "";
}
$smarty->assign("partyId",$partyId);
$smarty->assign("partyName",$partyName);
$smarty->assign("gPartyName",$gPartyName);
$smarty->assign("address",$address);
$smarty->assign("gAddress",$gAddress);
$smarty->assign("mobile",$mobile);
$smarty->assign("photo",$photo);
$smarty->assign("otherInfo",$otherInfo);
$smarty->assign("addOn",$addOn);
$smarty->display('enterNewPartyAjax.tpl');
?>
